<template>
	<view class="wraaper">
		<view class="head-nav">			
			<view class="n-l" :class="navIndex==0?'activite':''" @click="checkIndex(0)">全部<view class="icons"></view></view>
			<view class="n-l" :class="navIndex==1?'activite':''" @click="checkIndex(1)">招聘中<view class="icons"></view></view>
			<view class="n-l" :class="navIndex==2?'activite':''" @click="checkIndex(2)">待开放<view class="icons"></view></view>
			<view class="n-l" :class="navIndex==3?'activite':''" @click="checkIndex(3)">审核失败<view class="icons"></view></view>
		</view>
		<view class="jobsbox" v-if="navIndex==0">
			<view class="j-b-item">
				<view class="flex">
					<view class="fs-32 fc-32 flex-1">UI设计</view>
					<view class="fs-32 fc-d6c">待开放</view>
				</view>
				<view class="fc-99 fs-26 pad-top-15">广州 海珠区 琶洲 · 1-3年 · 大专</view>
			</view>
			<view class="j-b-item">
				<view class="flex">
					<view class="fs-32 fc-32 flex-1">UI设计</view>
					<view class="fs-32 fc-df5">审核失败</view>
				</view>
				<view class="fc-99 fs-26 pad-top-15">广州 海珠区 琶洲 · 1-3年 · 大专</view>
			</view>
		</view>
		<view class="jobsbox" v-if="navIndex==1">
			<view class="j-b-item">
				<view class="flex">
					<view class="fs-32 fc-32 flex-1">UI设计</view>
					<view class="fs-32 fc-84">招聘中</view>
				</view>
				<view class="fc-99 fs-26 pad-top-15">广州 海珠区 琶洲 · 1-3年 · 大专</view>
			</view>			
		</view>
		<view class="jobsbox" v-if="navIndex==2">
			<view class="j-b-item">
				<view class="flex">
					<view class="fs-32 fc-32 flex-1">UI设计</view>
					<view class="fs-32 fc-84">待开放</view>
				</view>
				<view class="fc-99 fs-26 pad-top-15">广州 海珠区 琶洲 · 1-3年 · 大专</view>
			</view>			
		</view>
		<view class="jobsbox" v-if="navIndex==3">
			<view class="j-b-item">
				<view class="flex">
					<view class="fs-32 fc-32 flex-1">UI设计</view>
					<view class="fs-32 fc-df5">审核失败</view>
				</view>
				<view class="fc-99 fs-26 pad-top-15">广州 海珠区 琶洲 · 1-3年 · 大专</view>
			</view>		
		</view>
		<view class="addjob-btn" @click="relasejobs">增加新职位</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				navIndex: 0,
			}
		},
		methods: {
			checkIndex(index) {
				console.log(index)
				this.navIndex = index;
			},	
			//发布职位
			relasejobs(){
				this.$mRouter.push({
					route: this.$mRoutesConfig.positionEdit,
					query: {}
				});
			}
		}
	}
</script>

<style lang="scss">
	.wraaper{
		border-top:1px solid #eee;
		.fc-d6c{
			color: #D6C634;
		}
		.head-nav {
			display: flex;
			justify-content: space-between;
			align-items: center;
			height: 80rpx;
			background: #fff;
			margin-bottom: 32rpx;			
			.n-l{
				width: 50%;
				text-align: center;
				line-height: 80rpx;
				font-size: 30rpx;
				color: #969799;
				position: relative;
				.icons{
					display: none;
					width: 80rpx;
					height:6rpx;
					background: #84C0F4;
					border-radius: 4rpx;
					opacity: 1;	
					position: absolute;
					bottom: 0;
					left: 0;
					right: 0;
					margin: auto;
				}
			}
			.activite>.icons{
				display: block;
			}	
		}	
		.jobsbox{
			.j-b-item{
				padding: 26rpx;
			}
		}
		.addjob-btn{
			width: 592rpx;
			height: 88rpx;
			background: #84C0F4;
			border-radius: 8px;
			opacity: 1;
			line-height: 88rpx;
			text-align: center;
			margin: 120rpx auto 0;
			color: #fff;
		}
	}
</style>
